package com.woniuxy.classdeans.service.impl;

import com.woniuxy.classdeans.mapper.DropoutInfoMapper;
import com.woniuxy.classdeans.service.DropoutInfoService;
import com.woniuxy.commons.entity.wyh.DropoutInfo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.Date;
import java.util.List;

/**
 * 退学信息
 *
 * @author wangyanhui
 * @date 2020/7/28 - 21:25
 */
@Service
public class DropoutInfoServiceImps implements DropoutInfoService {
    @Autowired
    private DropoutInfoMapper dropoutInfoMapper;

    /**
     * 新增退学信息
     *
     * @param stuid 学生id
     * @return
     */
    @Override
    public int addInfo(int stuid, Date date) {

        return dropoutInfoMapper.addInfo(stuid, date);
    }

    @Override
    public List<DropoutInfo> allDropoutInfo() {
        return dropoutInfoMapper.allDropoutInfo();
    }

    //修改退学审批状态
    @Override
    public int updateDropoutStatu(int stuid,int statu) {

        return dropoutInfoMapper.updateDropoutStatu(stuid,statu,new Date());
    }
}
